package com.booby.design.factory.method;

import com.booby.design.factory.I3Cpu;
import com.booby.design.factory.I5Cpu;
import com.booby.design.factory.I7Cpu;

/**
 * 功能描述: 方法工厂模式使用
 *
 * @author: lizt
 * @date: 2019-06-30 16:23
 **/

public class ApplyMehtodFatory {

    public static void main(String[] args) {
        I3Cpu i3Cpu = (I3Cpu) new I3Factory().getCpu();
        i3Cpu.run();

        I5Cpu i5Cpu = (I5Cpu) new I5Factory().getCpu();
        i5Cpu.run();

        new I7Factory().getCpu().run();
    }
}
